package com.jww.service.impl;

import com.jww.Utils.MyUtils;
import com.jww.domain.User;
import com.jww.mapper.UserMapper;
import com.jww.service.UserService;

import org.apache.ibatis.session.SqlSession;

public class UserServletImpl implements UserService {
    @Override
    public User login(String name, String pas) {
        SqlSession sqlSession = MyUtils.getSqlSession();

        UserMapper mapper = sqlSession.getMapper(UserMapper.class);

        User user = mapper.SelectByName(name, pas);

        return user;
    }
}
